3.6.86 \(\int x^m (a+b x^3)^2 \, dx\) [586]

Optimal. Leaf size=43 \[ \frac {a^2 x^{1+m}}{1+m}+\frac {2 a b x^{4+m}}{4+m}+\frac {b^2 x^{7+m}}{7+m} \]

[Out]

a^2*x^(1+m)/(1+m)+2*a*b*x^(4+m)/(4+m)+b^2*x^(7+m)/(7+m)

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 43, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.077, Rules used = {276} \begin {gather*} \frac {a^2 x^{m+1}}{m+1}+\frac {2 a b x^{m+4}}{m+4}+\frac {b^2 x^{m+7}}{m+7} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[x^m*(a + b*x^3)^2,x]

[Out]

(a^2*x^(1 + m))/(1 + m) + (2*a*b*x^(4 + m))/(4 + m) + (b^2*x^(7 + m))/(7 + m)

Rule 276

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*(a + b*x^n)^p,
 x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0]

Rubi steps

\begin {align*} \int x^m \left (a+b x^3\right )^2 \, dx &=\int \left (a^2 x^m+2 a b x^{3+m}+b^2 x^{6+m}\right ) \, dx\\ &=\frac {a^2 x^{1+m}}{1+m}+\frac {2 a b x^{4+m}}{4+m}+\frac {b^2 x^{7+m}}{7+m}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.04, size = 40, normalized size = 0.93 \begin {gather*} x^{1+m} \left (\frac {a^2}{1+m}+\frac {2 a b x^3}{4+m}+\frac {b^2 x^6}{7+m}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[x^m*(a + b*x^3)^2,x]

[Out]

x^(1 + m)*(a^2/(1 + m) + (2*a*b*x^3)/(4 + m) + (b^2*x^6)/(7 + m))

________________________________________________________________________________________

Maple [A]
time = 0.12, size = 51, normalized size = 1.19

method result size
norman \(\frac {a^{2} x \,{\mathrm e}^{m \ln \left (x \right )}}{1+m}+\frac {b^{2} x^{7} {\mathrm e}^{m \ln \left (x \right )}}{7+m}+\frac {2 a b \,x^{4} {\mathrm e}^{m \ln \left (x \right )}}{4+m}\) \(51\)
risch \(\frac {x \left (b^{2} m^{2} x^{6}+5 m \,x^{6} b^{2}+4 b^{2} x^{6}+2 a b \,m^{2} x^{3}+16 m \,x^{3} a b +14 a b \,x^{3}+a^{2} m^{2}+11 m \,a^{2}+28 a^{2}\right ) x^{m}}{\left (7+m \right ) \left (4+m \right ) \left (1+m \right )}\) \(92\)
gosper \(\frac {x^{1+m} \left (b^{2} m^{2} x^{6}+5 m \,x^{6} b^{2}+4 b^{2} x^{6}+2 a b \,m^{2} x^{3}+16 m \,x^{3} a b +14 a b \,x^{3}+a^{2} m^{2}+11 m \,a^{2}+28 a^{2}\right )}{\left (7+m \right ) \left (4+m \right ) \left (1+m \right )}\) \(93\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^m*(b*x^3+a)^2,x,method=_RETURNVERBOSE)

[Out]

a^2/(1+m)*x*exp(m*ln(x))+b^2/(7+m)*x^7*exp(m*ln(x))+2*a*b/(4+m)*x^4*exp(m*ln(x))

________________________________________________________________________________________

Maxima [A]
time = 0.30, size = 43, normalized size = 1.00 \begin {gather*} \frac {b^{2} x^{m + 7}}{m + 7} + \frac {2 \, a b x^{m + 4}}{m + 4} + \frac {a^{2} x^{m + 1}}{m + 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^m*(b*x^3+a)^2,x, algorithm="maxima")

[Out]

b^2*x^(m + 7)/(m + 7) + 2*a*b*x^(m + 4)/(m + 4) + a^2*x^(m + 1)/(m + 1)

________________________________________________________________________________________

Fricas [A]
time = 0.38, size = 85, normalized size = 1.98 \begin {gather*} \frac {{\left ({\left (b^{2} m^{2} + 5 \, b^{2} m + 4 \, b^{2}\right )} x^{7} + 2 \, {\left (a b m^{2} + 8 \, a b m + 7 \, a b\right )} x^{4} + {\left (a^{2} m^{2} + 11 \, a^{2} m + 28 \, a^{2}\right )} x\right )} x^{m}}{m^{3} + 12 \, m^{2} + 39 \, m + 28} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^m*(b*x^3+a)^2,x, algorithm="fricas")

[Out]

((b^2*m^2 + 5*b^2*m + 4*b^2)*x^7 + 2*(a*b*m^2 + 8*a*b*m + 7*a*b)*x^4 + (a^2*m^2 + 11*a^2*m + 28*a^2)*x)*x^m/(m
^3 + 12*m^2 + 39*m + 28)

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 313 vs. \(2 (36) = 72\).
time = 0.31, size = 313, normalized size = 7.28 \begin {gather*} \begin {cases} - \frac {a^{2}}{6 x^{6}} - \frac {2 a b}{3 x^{3}} + b^{2} \log {\left (x \right )} & \text {for}\: m = -7 \\- \frac {a^{2}}{3 x^{3}} + 2 a b \log {\left (x \right )} + \frac {b^{2} x^{3}}{3} & \text {for}\: m = -4 \\a^{2} \log {\left (x \right )} + \frac {2 a b x^{3}}{3} + \frac {b^{2} x^{6}}{6} & \text {for}\: m = -1 \\\frac {a^{2} m^{2} x x^{m}}{m^{3} + 12 m^{2} + 39 m + 28} + \frac {11 a^{2} m x x^{m}}{m^{3} + 12 m^{2} + 39 m + 28} + \frac {28 a^{2} x x^{m}}{m^{3} + 12 m^{2} + 39 m + 28} + \frac {2 a b m^{2} x^{4} x^{m}}{m^{3} + 12 m^{2} + 39 m + 28} + \frac {16 a b m x^{4} x^{m}}{m^{3} + 12 m^{2} + 39 m + 28} + \frac {14 a b x^{4} x^{m}}{m^{3} + 12 m^{2} + 39 m + 28} + \frac {b^{2} m^{2} x^{7} x^{m}}{m^{3} + 12 m^{2} + 39 m + 28} + \frac {5 b^{2} m x^{7} x^{m}}{m^{3} + 12 m^{2} + 39 m + 28} + \frac {4 b^{2} x^{7} x^{m}}{m^{3} + 12 m^{2} + 39 m + 28} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**m*(b*x**3+a)**2,x)

[Out]

Piecewise((-a**2/(6*x**6) - 2*a*b/(3*x**3) + b**2*log(x), Eq(m, -7)), (-a**2/(3*x**3) + 2*a*b*log(x) + b**2*x*
*3/3, Eq(m, -4)), (a**2*log(x) + 2*a*b*x**3/3 + b**2*x**6/6, Eq(m, -1)), (a**2*m**2*x*x**m/(m**3 + 12*m**2 + 3
9*m + 28) + 11*a**2*m*x*x**m/(m**3 + 12*m**2 + 39*m + 28) + 28*a**2*x*x**m/(m**3 + 12*m**2 + 39*m + 28) + 2*a*
b*m**2*x**4*x**m/(m**3 + 12*m**2 + 39*m + 28) + 16*a*b*m*x**4*x**m/(m**3 + 12*m**2 + 39*m + 28) + 14*a*b*x**4*
x**m/(m**3 + 12*m**2 + 39*m + 28) + b**2*m**2*x**7*x**m/(m**3 + 12*m**2 + 39*m + 28) + 5*b**2*m*x**7*x**m/(m**
3 + 12*m**2 + 39*m + 28) + 4*b**2*x**7*x**m/(m**3 + 12*m**2 + 39*m + 28), True))

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 117 vs. \(2 (43) = 86\).
time = 1.43, size = 117, normalized size = 2.72 \begin {gather*} \frac {b^{2} m^{2} x^{7} x^{m} + 5 \, b^{2} m x^{7} x^{m} + 4 \, b^{2} x^{7} x^{m} + 2 \, a b m^{2} x^{4} x^{m} + 16 \, a b m x^{4} x^{m} + 14 \, a b x^{4} x^{m} + a^{2} m^{2} x x^{m} + 11 \, a^{2} m x x^{m} + 28 \, a^{2} x x^{m}}{m^{3} + 12 \, m^{2} + 39 \, m + 28} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^m*(b*x^3+a)^2,x, algorithm="giac")

[Out]

(b^2*m^2*x^7*x^m + 5*b^2*m*x^7*x^m + 4*b^2*x^7*x^m + 2*a*b*m^2*x^4*x^m + 16*a*b*m*x^4*x^m + 14*a*b*x^4*x^m + a
^2*m^2*x*x^m + 11*a^2*m*x*x^m + 28*a^2*x*x^m)/(m^3 + 12*m^2 + 39*m + 28)

________________________________________________________________________________________

Mupad [B]
time = 1.31, size = 93, normalized size = 2.16 \begin {gather*} x^m\,\left (\frac {a^2\,x\,\left (m^2+11\,m+28\right )}{m^3+12\,m^2+39\,m+28}+\frac {b^2\,x^7\,\left (m^2+5\,m+4\right )}{m^3+12\,m^2+39\,m+28}+\frac {2\,a\,b\,x^4\,\left (m^2+8\,m+7\right )}{m^3+12\,m^2+39\,m+28}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^m*(a + b*x^3)^2,x)

[Out]

x^m*((a^2*x*(11*m + m^2 + 28))/(39*m + 12*m^2 + m^3 + 28) + (b^2*x^7*(5*m + m^2 + 4))/(39*m + 12*m^2 + m^3 + 2
8) + (2*a*b*x^4*(8*m + m^2 + 7))/(39*m + 12*m^2 + m^3 + 28))

________________________________________________________________________________________